<div th:fragment="sidebar" id="sidebar" class="sidebar responsive ace-save-state"
     xmlns:th="http://www.w3.org/1999/xhtml">
    <script type="text/javascript">
        try {
            ace.settings.loadState('sidebar')
        } catch (e) {
        }
    </script>

    <ul class="nav nav-list">
        <li th:each="menu,meunStat : ${menus}" class="">
            <!--IF menu has url 也就是说有url的时候-->
            <a class="sub_url" th:if="${menu.url != ''}" th:text="${menu.title}" th:href="${menu.url}"
               th:utext="|<i class='${menu.cssClass}'></i> <span class='menu-text'>${menu.title}</span> <b class='arrow  fa fa-angle-right'></b> |">
                未正确加载菜单
            </a>
            <!--IF menu has not url 也就是说没有url的时候-->
            <a th:if="${menu.url == ''}"
               th:utext="|<i class='${menu.cssClass}'></i> <span class='menu-text'>${menu.title}</span> <b class='arrow  fa fa-angle-down'></b> |"
               href="#" class="dropdown-toggle">
                未正确加载菜单
            </a>
            <b th:if="${menu.url == ''}" class="arrow"></b>
            <ul th:if="${menu.url == ''}" class="submenu" style="display: block;">
                <li th:each="subMenu, subMenuStat : ${menu.subMenu}" class="sub_menu">
                    <a class="sub_url" th:text="${subMenu.title}" th:href="${subMenu.url}">
                        未正确加载菜单
                    </a>
                    <b class="arrow"></b>
                </li>
            </ul>
        </li>
    </ul><!-- /.nav-list -->
    <div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
        <i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state"
           data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
    </div>
</div>

